//
//  YBQuestionnaireModel.m
//  HomeDoorWay
//
//  Created by apple on 17/11/16.
//  Copyright © 2017年 刘应平. All rights reserved.
//

#import "YBQuestionnaireModel.h"

@implementation YBQuestionnaireModel

-(void)calculateCellHeight{
    if ([self.ANS_STATE integerValue] == 1) {
        self.titleSize = [[NSString stringWithFormat:@"[已答题] %@" ,self.PSQ_TITLE] boundingRectWithSize:CGSizeMake([UIScreen zj_screenWith] - ItemPX * 160, ItemPX * 150) options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName : LYPFONT(16)} context:nil].size;
    }
    else{
        self.titleSize = [self.PSQ_TITLE boundingRectWithSize:CGSizeMake([UIScreen zj_screenWith] - ItemPX * 160, ItemPX * 150) options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName : LYPFONT(16)} context:nil].size;
    }
    self.cellHeight = self.titleSize.height + ItemPX * 110;
}

@end
